///@file Point.h
///@brief Declaration of the class representing a point
///@author Arnaud Duval
///@version 0.0
///@date 2010/03/31


#ifndef POINT_H
#define POINT_H

#include <iostream>

///@class Point
///@brief Class defining a Point
/// A point is made of an array of coordinates
class Point
{
	private:
		///@brief array containing the coordinates of the point
		double *coords;
		///@brief dimension of used space
		unsigned int dim;
	public:
		///@brief Default constructor
		Point();
		///@brief Constructor giving space dimension
		Point(int);
		///@brief Copy constructor
		Point(const Point&);
		///@brief Copy constructor for temporary object
		Point(Point*);
		///@brief Destructor
		~Point();
		///@brief return Dimension of used space
		unsigned int Dim();
		///@brief return a coordinate
		double& Coord(unsigned int);
		///@brief Overload of = operator
		Point& operator=(const Point&);
		///@brief Overload of = operator for temporary object
		Point& operator=(Point*);
		///@brief Overload of &= operator : copy without size check
		Point& operator&=(const Point&);
		///@brief Compute distance between two points
		friend double Distance(const Point&, const Point&);

};


#endif